﻿@inherits BasicFormBase
    <BForm Style="width:400px;" @ref="demoForm">
        <BFormItem TValue="string" Label="活动名称" Name="@nameof(Activity.Name)" IsRequired="true">
            <BInput TValue="string"></BInput>
        </BFormItem>
        <BFormItem TValue="Area" Label="活动区域" Name="@nameof(Activity.Area)" IsRequired="true">
            <BSelect TValue="Area" Placeholder="请选择活动区域">
            </BSelect>
        </BFormItem>
        <BFormItem TValue="Area?" Label="活动区域2" Name="@nameof(Activity.Area1)" IsHidden="true">
            <BInput Value="(Area?)Area.Shanghai"></BInput>
        </BFormItem>
        <BFormItem TValue="DateTime?" Label="活动时间" IsRequired="true" Name="@nameof(Activity.Time)">
            <BDatePicker></BDatePicker>
        </BFormItem>
        <BFormItem TValue="bool" Label="即时配送" IsRequired="true" Name="@nameof(Activity.Delivery)">
            <BSwitch TValue="bool" ActiveValue="true" InactiveValue="false"></BSwitch>
        </BFormItem>
        <BFormItem TValue="IEnumerable<string>" Label="活动性质" IsRequired="true" Name="@nameof(Activity.Type)">
            <BCheckBoxGroup TValue="string">
                <BCheckBox Value="@("Online")">美食线上活动</BCheckBox>
                <BCheckBox Value="@("Offline")">地推活动</BCheckBox>
            </BCheckBoxGroup>
        </BFormItem>
        <BFormItem TValue="string" Label="特殊资源" IsRequired="true" Name="@nameof(Activity.Resource)">
            <BRadio Value="@("品牌")">线上品牌赞助</BRadio>
            <BRadio Value="@("场地")">线上场地免费</BRadio>
        </BFormItem>
        <BFormItem TValue="string" Label="活动形式" IsRequired="true" Name="@nameof(Activity.Description)">
            <BInput TValue="string" Type="@InputType.Textarea"></BInput>
        </BFormItem>
        <BFormActionItem>
            <BButton Type="@ButtonType.Primary" OnClick="e=>Submit()">立即创建</BButton>
            <BButton OnClick="e=>Reset()">重置</BButton>
        </BFormActionItem>
    </BForm>